﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Weixin.Utils;

namespace Weixin.Web
{
    public partial class Login : System.Web.UI.Page
    {
        string _UserName, _Password;
        protected void Page_Load(object sender, EventArgs e)
        {
            _UserName = StringOperate.SqlReplace(Request.Form["txtUserName"]);
            _Password = StringOperate.SqlReplace(Request.Form["txtPassword"]);
            if (_UserName == "123" && _Password == "456")
            {
                Session["WXUser"] = "wupeng";
                Response.Redirect("UserIndex.aspx");
            }
            else if (_UserName != string.Empty && _Password != string.Empty)
            {
                lErr.Visible = true;
                lErr.Text = "用户名或者密码错误，请重试";
            }
        }
    }
}